import Vue from "vue";
import VueRouter from "vue-router";
import index from "../views/index.vue";
import counter from "../components/counter.vue";
import forecast from "../components/forecast.vue";
import publish from "../components/publish.vue";
import count from "../components/count.vue";
import product from "../components/product.vue";
import multiplyChooser from "../components/multiplyChooser.vue";
import value from "../components/value.vue";
import lianxi from "../components/lianxi.vue";
import props from "../components/props_father.vue";
import cycle from "../components/cycle.vue";
import cycletwo from "../components/cycletwo.vue";
import vuex from "../components/vuex.vue";
import slideShow from "../components/slideShow";

Vue.use(VueRouter);

const routes = [
	{
		path: "/",
		name: "index",
		component: index,
		children: [
			{
				path: "/counter",
				name: "counter",
				component: counter
			},
			{
				path: "/forecast",
				name: "forecast",
				component: forecast
			},{
				path: "/count/slideShow",
				name: "slideShow",
				component: slideShow
			},
			{
				path: "/publish",
				name: "publish",
				component: publish
			},
			{
				path: "/product",
				name: "product",
				component: product,
			},
			{
				path: "/count",
				name: "count",
				component: count
			},
			{
				path: "/count/multiplyChooser",
				name: "multiplyChooser",
				component: multiplyChooser,
			},
			{
				path: "/publish/value",
				name: "value",
				component: value,
			},
			{
				path: "/lianxi",
				name: "lianxi",
				component: lianxi,
			},
			{
				path: "/props",
				name: "props",
				component: props,
			},
			{
				path: "/cycle",
				name: "cycle",
				component: cycle,
			},
			{
				path: "/cycle/cycletwo",
				name: "cycletwo",
				component: cycletwo,
			},
			{
				path: "/vuex",
				name: "vuex",
				component: vuex,
			},
			// {
			// 	path: "/cycle",
			// 	name: "cycle",
			// 	components: {
			// 		main: lianxi,
			// 		sidebar: SideBar
			// 	},
			// }
			// {
			// 	path: "/props",
			// 	name: "props",
			// 	components: {
			// 		main: props,
			// 	},
			// },
		]
	},



];

const router = new VueRouter({
	mode: "hash",
	base: process.env.BASE_URL,
	routes
});

export default router;
